//
//  ImageExt.swift
//  kano
//
//  Created by Sophia on 2024/8/14.
//

import UIKit

extension UIImage {

    static func ka_imageWithColor(imgColor : UIColor) -> UIImage {
        let var_imgSize : CGSize = CGSize(width: 1, height: 1)
        UIGraphicsBeginImageContextWithOptions(var_imgSize, false, 0)
        imgColor.setFill()
        
        let var_imgRect : CGRect = CGRect(x: 0, y: 0, width: 1, height: 1)
        UIRectFill(var_imgRect)
        let var_image : UIImage = UIGraphicsGetImageFromCurrentImageContext()!
        UIGraphicsEndImageContext()
        return var_image
    }
}
